/**
 * tigerrad
 * fall 2006
 */

#ifndef _LIGHT_H
#define _LIGHT_H

class Light
{
	public:
		/**
		 * Constructor.
		 * @param mat Color properties of the light
		 * @param center Light position
		 * @param dir Light direction
		 * @param up Up direction, if rendering from light
		 */
		Light(const Material& mat, const Vec3& center, const Vec3& dir, const Vec3& up)
			: _mat(mat), _dir(dir), _up(up), _center(center)
		{
		}

		/**
		 * Return the diffuse color of this area light.
		 */
		Vec3 getDiffuse() const { return _mat.diffuse; }

		/**
		 * Return the light direction.
		 */
		Vec3 getDir() const { return _dir; }

		/**
		 * Return the up direction, used when rendering from this light.
		 */
		Vec3 getUp() const { return _up; }

		/**
		 * Return the center of the light
		 */
		virtual Vec3 getCenter() const { return _center; }

		/**
		 * Destructor.
		 */
		virtual ~Light() { }
		
	protected:
		Material _mat;
		Vec3 _dir;
		Vec3 _up;
		Vec3 _center;

};

#endif

